export default {
	// Global page headers: https://go.nuxtjs.dev/config-head
	mode: 'universal',
	// mode: 'spa',
	head: {
		title: '一起家具网-价格全透明,厂家随意挑,家具定制服务平台',
		htmlAttrs: {
			lang: 'en'
		},
		meta: [
			{ charset: 'utf-8' },
			{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
			{ name: 'keywords', content: '家具定制，办公家具，红木家具，家具设计，定制衣柜，全屋家具定制，一起家具网'},
			{ hid: 'description', name: 'description', content: '作为中国领先的家具互联网企业,一起家具网为中国家具定制用户提供专业、丰富的互联网资讯和导购服务,并为家具厂商和家具经销商提供卓有成效的互联网营销解决方案。' }
		],
		link: [
			{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
		],
		script: [
			// {src:'https://pht.zoosnet.net/JS/LSJS.aspx?siteid=PHT54704646&lng=cn'},
			{
				src: 'https://webapi.amap.com/maps?v=1.4.15&key=e7386e5de8be52fd4ce3c2d283abf560',
			}
		]
	},

	// Global CSS: https://go.nuxtjs.dev/config-css
	css: [
		'view-design/dist/styles/iview.css',
		'~/css/comm.css',
		"swiper/swiper-bundle.css"
	],

	// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
	plugins: [
		'@/plugins/view-ui',
		'@/plugins/api',
		'@/plugins/map',
		{ src: '@/plugins/vue-persistedstate.js', ssr: false },
		{ src: '@/plugins/swiper.js', ssr: false },
		{ src: '@/plugins/router', ssr: false },
		// '@/plugins/router' // 路由守卫
	],

	// Auto import components: https://go.nuxtjs.dev/config-components
	components: true,

	// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
	buildModules: [
	],

	// Modules: https://go.nuxtjs.dev/config-modules
	modules: [
		'@nuxtjs/axios', '@nuxtjs/proxy',
		'cookie-universal-nuxt', ['cookie-universal-nuxt', { parseJSON: true }],
	],
	axios: {
		proxy: true, // 表示开启代理
		// prefix: '/api', // 表示给请求url加个前缀 /api
		// credentials: true // 表示跨域请求时是否需要使用凭证
	},
	proxy: {
		'/api': {
			target: 'http://api.app.17home.com', // 目标接口域名
			changeOrigin: true, // 表示是否跨域
			pathRewrite: {
				'^/api': '/', // 把 /api 替换成 /
			}
		}
	},

	// Build Configuration: https://go.nuxtjs.dev/config-build
	build: {
		vendor: ['axios'] //为防止重复打包
	}
}
